package com.example.wm.SanWar.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.wm.SanWar.entity.ConfedrateStatics;
import com.example.wm.SanWar.mapper.ConfedrateStaticMapper;
import com.example.wm.SanWar.service.ConfedrateStaticService;
import com.example.wm.utils.ExcelReader;
import org.springframework.stereotype.Service;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Service
public class ConfedrateStaticImpl extends ServiceImpl<ConfedrateStaticMapper, ConfedrateStatics> implements ConfedrateStaticService {
    public List<Map> getListByExcel(InputStream is, String fileName) {
            ConfedrateStatics c=new ConfedrateStatics();
        try{

            List<Map> studentList = new ExcelReader(c).AnalysisExcel(is, fileName);
            return studentList;
        }catch (Exception e){
            e.printStackTrace();
        }
        return new ArrayList<>();
    }
//    public Boolean batchImportStuInfo(List<Map> list){
//        Integer flag = .batchImportStuInfo(list);
//        if (flag > 0){
//            return true;
//        } else return false;
//    }

}
